Skip to content

BFD-4707: Eob updates for previous and next links on patient searches - #3156

Merged
marshallweekley-eng merged 30 commits into
masterfrom
BFD-4707
Jun 11, 2026
Merged

BFD-4707: Eob updates for previous and next links on patient searches#3156
marshallweekley-eng merged 30 commits into
masterfrom
BFD-4707

Conversation

@marshallweekley-eng

@marshallweekley-eng marshallweekley-eng commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

JIRA Ticket:
BFD-4707

What Does This PR Do?

  • Applies links to ExplanationOfBenefit for patient searches that that have more records that the limit allows
  • Adopting _offset as the primary parameter for offsets/startindex
    • We will still respect startIndex if _offset is not provided to avoid a breaking change
    • All offsets in links will use _offset expect for self which will return whatever the server was given.

What Should Reviewers Watch For?

Take note of the comments to how it is determined to add the links

If you're reviewing this PR, please check for these things in particular:
Look at the method used to determine if there is next. A case could be made to make it a little more explicit. I chose not to for performance reasons to avoid processing streams more than needed.

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

There are no security concerns with the PR. It only adds additional model detail to request reponses.

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)
  • I have created tests to sufficiently ensure the reliability of my code, if applicable. If this is a modification to an existing piece of code, I have audited the associated tests to ensure everything works as expected.

Validation

The links in the FHIR json are now present

{
  "resourceType": "Bundle",
  "id": "06fa4107-507e-4d3a-9b1e-f4b8ff9822a1",
  "meta": {
    "lastUpdated": "2026-06-04T10:03:39.072-05:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "next",
      "url": "http://localhost:8080/v3/fhir/ExplanationOfBenefit?patient=284934751&_count=2&startIndex=4"
    },
    {
      "relation": "previous",
      "url": "http://localhost:8080/v3/fhir/ExplanationOfBenefit?patient=284934751&_count=2"
    },
    {
      "relation": "self",
      "url": "http://localhost:8080/v3/fhir/ExplanationOfBenefit?_count=2&patient=284934751&startIndex=2"
    }
  ],
  "entry": []
 }

@marshallweekley-eng marshallweekley-eng changed the title Eob updates for previous and next links on patient searches BFD-4707: Eob updates for previous and next links on patient searches Jun 5, 2026
Comment thread apps/bfd-server-ng/src/main/java/gov/cms/bfd/server/ng/util/FhirUtil.java Outdated
Comment thread apps/bfd-server-ng/src/main/java/gov/cms/bfd/server/ng/util/FhirUtil.java Outdated
Comment thread apps/bfd-server-ng/src/main/java/gov/cms/bfd/server/ng/util/FhirUtil.java Outdated
Comment thread apps/bfd-server-ng/src/main/java/gov/cms/bfd/server/ng/eob/EobHandler.java Outdated
Comment thread apps/bfd-server-ng/src/test/java/gov/cms/bfd/server/ng/EobSearchIT.java Outdated
Comment thread apps/bfd-server-ng/src/main/java/gov/cms/bfd/server/ng/eob/EobHandler.java Outdated
Adjust collecting in fhir util to use helper functions to aid readability of code
@bfd-sast

bfd-sast Bot commented Jun 11, 2026

Copy link
Copy Markdown

@marshallweekley-eng
marshallweekley-eng added this pull request to the merge queue Jun 11, 2026
Merged via the queue into master with commit a268324 Jun 11, 2026
9 checks passed
@marshallweekley-eng
marshallweekley-eng deleted the BFD-4707 branch June 11, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants